]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status: don't show 'Show Keyboard Layout' on the login screen
authorMatthias Clasen <mclasen@redhat.com>
Fri, 16 Sep 2011 13:42:43 +0000 (09:42 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 16 Sep 2011 13:45:11 +0000 (09:45 -0400)
It does not make a great amount of sense to have this function
on the login screen. And worse, it does not work, since the greeter
is currently a modal dialog, so interaction with the opening
window is impossible.

https://bugzilla.gnome.org/show_bug.cgi?id=659164

js/ui/status/keyboard.js

index 5a12df17aa3a5dd59415cf77dade168e86624977..3c899975334573be3b63518fe27f0c3219467cb9 100644 (file)
@@ -67,11 +67,13 @@ XKBIndicator.prototype = {
 
         this._sync_config();
 
-        this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
-        this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
-            Main.overview.hide();
-            Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
-        }));
+        if (global.session_type == Shell.SessionType.USER) {
+            this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+            this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
+                Main.overview.hide();
+                Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
+            }));
+        }
         this.menu.addSettingsAction(_("Region and Language Settings"), 'gnome-region-panel.desktop');
     },